#ifndef DIANEWSERVER_H
#define DIANEWSERVER_H

#include "modelserver.h"

#include <QDialog>

namespace Ui {
class DiaNewServer;
}

class DiaNewServer : public QDialog
{
    Q_OBJECT

public:
    explicit DiaNewServer(QWidget *parent = nullptr, ModelServer* info = nullptr);
    ~DiaNewServer();

    void setName(QString name);                     //设置名称
    void setServer(QString dest);                   //设置服务器
    void setPort(QString port);                     //设置端口

signals:
    void signalAccepted(bool isNew, ModelServer info);

protected:
    void accept() override;

private:
    Ui::DiaNewServer *ui;
    bool m_isnew = true;
    ModelServer* m_server = nullptr;
};

#endif // DIANEWSERVER_H
